package cn.webrx.bs.service;

import cn.webrx.bs.db.DruidUtil;
import cn.webrx.bs.entity.Ad;
import org.apache.commons.dbutils.QueryRunner;

import java.util.List;

/**
 * <p>功能描述: </p>
 *
 * @author webrx
 * @version 1.0
 * @date 2020-08-13 17:39
 */
public interface AdDao {
    public QueryRunner run = new QueryRunner(DruidUtil.getDataSource());
    public int add(Ad ad);
    public int add(String title,String url,String img);
    public int deleteById(int id);
    public int deleteById(int id,String url);
    public int delete(Ad ad);
    public int update(Ad ad);
    public int update(int id,boolean shows);
    public Ad queryById(int id);
    public List<Ad> queryAll();
    public List<Ad> show();
}
